package com.alibaba.ecool.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.web.servlet.mvc.SimpleFormController;

public class UserLogoutContorller implements Controller{

	private String successView;
		
		public ModelAndView handleRequest(HttpServletRequest request,
				HttpServletResponse response) throws Exception {
			// TODO Auto-generated method stub
			request.getSession().invalidate();
			response.sendRedirect("login.do");
			return new ModelAndView(getSuccessView()); 
		}
		public String getSuccessView() {
			return successView;
		}
		public void setSuccessView(String successView) {
			this.successView = successView;
		}
		
}
